/**
 * 
 */
package com.edocbase.desktop;

import org.eclipse.swt.widgets.Display;

/**
 * @author lifei114@gmail.com
 * 
 */
public class DesktopUI {
    /**
     * Return code (value 0) indicating that the workbench terminated normally.
     * 
     * @see #createAndRunWorkbench
     * @since 3.0
     */
    public static final int RETURN_OK = 0;

    /**
     * Return code (value 1) indicating that the workbench was terminated with
     * a call to <code>IWorkbench.restart</code>.
     * 
     * @see #createAndRunWorkbench
     * @see IWorkbench#restart
     * @since 3.0
     */
    public static final int RETURN_RESTART = 1;

    /**
     * Return code (value 2) indicating that the workbench failed to start.
     * 
     * @see #createAndRunWorkbench
     * @see IWorkbench#restart
     * @since 3.0
     */
    public static final int RETURN_UNSTARTABLE = 2;

    /**
     * Return code (value 3) indicating that the workbench was terminated with
     * a call to IWorkbenchConfigurer#emergencyClose.
     * 
     * @see #createAndRunWorkbench
     * @since 3.0
     */
    public static final int RETURN_EMERGENCY_CLOSE = 3;
	public static Display createDisplay() {
		return Desktop.createDisplay();
	}
	
    public static int createAndRunWorkbench(Display display,
            DesktopAdvisor advisor) {
        return Desktop.createAndRunWorkbench(display, advisor);
    }
}
